package pl.edu.pw.perg.compinfodb.command;

import org.springframework.richclient.command.support.AbstractActionCommandExecutor;

import pl.edu.pw.perg.compinfodb.datamodel.HistoryTableModel;
import pl.edu.pw.perg.compinfodb.datamodel.IEventModificationListener;

public class SaveEventsCommandExecutor extends AbstractActionCommandExecutor 
	implements IEventModificationListener{

	private HistoryTableModel htm;
	
	public SaveEventsCommandExecutor(HistoryTableModel htm){
		this.htm = htm;
	}
	
	@Override
	public void execute() {
		htm.saveItems();
	}


	public void historyChanged(boolean changed) {
		setEnabled(changed);		
	}
}
